<import file="Common.uploadify.uploadify" type="css"/>
<import file="Common.uploadify.jquery#uploadify#min"/>
<script type="text/javascript">
$(function() {
    $("#addBtn").uploadify({
    	'buttonText' : '添加图片',
    	'buttonClass': '',
        'swf'      : '__PUBLIC__/Common/uploadify/uploadify.swf',
        'uploader' : '{:U("Admin/Banner/add")}',
        'onUploadSuccess' : function(file, data, response) {
            var jsonData = JSON.parse(data);
            if( jsonData.error==0 ){
            	window.location.reload();
            	showsuccess('上传成功');
            	
            }
            else{
            	showerror('上传失败');
            }
        } 
    });
});
</script>